package com.campus_assistant.mapper.db1;

import com.campus_assistant.pojo.db1.Courses;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
public interface CoursesMapper {
    int addCourses(Courses courses);
    int deleteCourses(int id);
    int updateCourses(Courses courses);
    List<Courses> selectAll();
    int getIdByCourseNameAndTeacherName(String courseName,String teacherName);//通过课程名和教师名获取id
    List<Courses> getCoursesByTeacherName(String teacherName);//通过教师名获取课程信息
    List<String> getTeacherNameByCoursesName(String coursesName);//通过课程名获取教师信息
    List<Courses> getCoursesByName(String name);
    Courses getCoursesById(int id);
}
